#include <iostream>
#include <stack>
#include <vector>

using std::cout;
using std::endl;
using std::stack;
using std::vector;

void test0()
{
    //可以设置第二个模板参数，指定底层实现
    stack<int, vector<int>> st;
    for(int i = 1; i < 10; ++i) {
        st.emplace(i);
    }
    while(!st.empty()) {
        cout << st.top() << endl;
        st.pop();
    }
}

int main()
{
    test0();
    return 0;
}

